#{extends 'main.html' /}
#{set title:'用户设置' /}
#{set 'moreScripts'}
	#{script 'user.js' /}
#{/set}
#{set 'moreStyles'}
     #{stylesheet 'user.css' /}
#{/set}

<div class="content_body_970">
	<div class="user_setting_left">
		test
	</div>
	<div class="user_setting_right">
		<form action="@{users.uploadAvatar()}" enctype="multipart/form-data" method="post">
			<div>
				#{if user.avatarFileName == null }
					<img alt="请设置用户头像" src="@{'/public/images/avatar.png'}"/>
				#{/if}
				#{else}
				    <img alt="" src="@{users.getAvatar(user.id)}"/>
				#{/else}
			</div>
			<div>
				<input type="file" name="file" value="设置头像"/>
				<input type="submit" value="上传"/>
			</div>
		</form>
	</div>
</div>